home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / pdflib / bindings / perl / hello.pl next >
Perl Script  |  1999-09-16  |  486b  |  22 lines

  1. #!/usr/bin/perl
  2.  
  3. use pdflib;
  4. package pdflib;
  5.  
  6. $fp = fopen("hello_perl.pdf", "w");
  7. $ip = PDF_get_info();
  8. $ip->{Creator} = "hello.pl";
  9. $ip->{Author} = "RJS";
  10. $ip->{Title} = "Hello world (Perl)";
  11. $ip->{fontpath} = "../../fonts";
  12.  
  13. $p = PDF_open($fp, $ip);
  14.  
  15. PDF_begin_page($p, $a4->{width}, $a4->{height});
  16. PDF_set_font($p, "Helvetica-Bold", 18.0, $winansi);
  17. PDF_set_text_pos($p, 50, 700);
  18. PDF_show($p, "Hello world!");
  19. PDF_continue_text($p, "(says Perl)");
  20. PDF_end_page($p);
  21. PDF_close($p);
  22.